package com.project.demo.controller;

import com.project.demo.entity.Affairs;
import com.project.demo.entity.Evaluate;
import com.project.demo.entity.Hotspot;
import com.project.demo.mapper.AffairsMapper;
import com.project.demo.mapper.HotspotMapper;
import com.project.demo.vo.AffairsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HotspotController {
    @Autowired(required = false)
    HotspotMapper hotspotMapper;
    
    @RequestMapping("/showhotspot")
    public AffairsVo showhotspot(){
        List<Hotspot> hotspots = hotspotMapper.selectList(null);

        AffairsVo affairsVo=new AffairsVo();
        affairsVo.setCode(0);
        affairsVo.setData(hotspots);
        affairsVo.setMsg("");
        affairsVo.setCount(hotspots.size());
        return  affairsVo;
    }
    @RequestMapping("/showhotspot1")
    public List<Hotspot> showhotspot1(){
        List<Hotspot> hotspots = hotspotMapper.selectList(null);


        return  hotspots;
    }
}
